<template>
	<view class="">
		<view class="header-area">
			<businessCard :businessCardInformation="businessCardInformation" :userInfo="userInfo"></businessCard>
			
			<!-- <view v-if="myBusinessCardInformation.status != -1" class="pangmenzhengdao-font bg-white u-border-radius-10 u-padding-30 u-margin-right-30 u-margin-top-30 u-margin-left-30 u-font-weight-500 md u-flex u-row-between">
				<text>我的评论和浏览</text>
				<u-icon name="arrow-right" :size="24" color="#C8C9CC"></u-icon>
			</view> -->
			
			<view v-if="businessCardInformation.status != -1" class=" bg-white u-margin-right-30 u-margin-top-30 u-margin-left-30 u-border-radius-10">
				<publishData :userId="userId"></publishData>
			</view>
		</view>
		<xy-loading v-if="loadingShowStatus"></xy-loading>
	</view>
</template>

<script>
	import {
		queryBasicInformation
	} from '@/api/userBusinessCard'
	import { mapGetters } from 'vuex'
	import businessCard from '../components/business_card.vue'
	import publishData from './components/publish_data.vue'
	
	export default {
		components:{
			publishData,
			businessCard
		},
		data() {
			return {
				userId:0,
				functionTabList:[
					{
						name: 'TA的甩单需求'
					}, {
						name: 'TA的合作需求'
					}, {
						name: 'TA的进件进展',
					}
				],
				current:0,
				loadingShowStatus:true,
				businessCardInformation:{}
			}
		},
		onLoad(e) {
			if(this.$u.test.isEmpty(e.user_id)){
				return uni.navigateBack()
			}else{
				this.userId = e.user_id
			}
			this.queryBasicInformationFun()
		},
		methods:{
			async queryBasicInformationFun() {
				let _this = this;
				let d = await queryBasicInformation({
					user_id : _this.userId
				});
				if(d.code == 1)this.businessCardInformation = d.data;
				_this.loadingShowStatus = false;
			},
			change(index) {
				this.current = index
			}
		},
		computed: {
			...mapGetters(["userInfo"]),
		}
	}
</script>

<style lang="scss" scoped>
	page {
		min-height: 100vh;
		background: linear-gradient(to top, rgba(242, 242, 242, 1) 60%,  rgba(120, 201, 255, 1) 100%);
		
		.fill-information-area{
			margin-top: 100rpx;
			
			.fill-information-btn{
				padding: 18rpx 80rpx;
				display: inline-flex;
				border-radius: 100rpx;
				background: linear-gradient(180deg, #6BB2FF 0%, #437EEA 100%);
			}
		}
		
		.audit-status-icon{
			top: 50%;
			right: 5%;
			width: 150rpx;
			position: absolute;
			transform: translateY(-50%);
		}
	}
</style>